diff options
Diffstat (limited to 'roms/programs/Random Number Test [Matthew Mikolay, 2010].txt')
-rw-r--r-- | roms/programs/Random Number Test [Matthew Mikolay, 2010].txt | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/roms/programs/Random Number Test [Matthew Mikolay, 2010].txt b/roms/programs/Random Number Test [Matthew Mikolay, 2010].txt new file mode 100644 index 0000000..7a18661 --- /dev/null +++ b/roms/programs/Random Number Test [Matthew Mikolay, 2010].txt @@ -0,0 +1,17 @@ +Hey guys!
+
+I don't know if any of you will be interested in this, but I wrote this small
+program while coding my game to test out the random number generator. I wanted
+to see if there is a chance that zero will show up as the random number, and it
+turns out it can.
+
+Anyway, when you run the program, it brings a random number up on the screen.
+When you press any of the keys, it brings another random number up on the
+screen. This goes on until you quit the program.
+
+Address 0x202 holds the C0FF instruction, which commands the CHIP-8 interpreter
+to set V0 to a random number with the mask 0xFF. This yields 256 different
+possible numbers (0-255). If C0FF is changed to something like C00A, then the
+mask will change. This would yield 11 different possible numbers (0-10).
+
+-Matt
\ No newline at end of file |